#!/usr/bin/python

import os

for i in range(1, 44):
    os.system("java org.apache.lucene.demo.IndexFiles -docs txt/{} -index txt-index/i{}".format(i, i))
    os.system("java CountWords txt-index/i{} > txt-out/i{}.out".format(i, i))
